/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package model;
import controller.WriteXMLFileStudent;
import java.io.IOException;
import java.util.Date;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import org.xml.sax.SAXException;

/**
 *
 * @author Phillipp
 */
public class Student {
    
    public String studentFirstName,studies, degree, studentLastName, title, gender, officialAdress, currentAdress, email, phoneNumber, matriculationNumber;
    Date dateOfBirth;
    Course[] course = new Course[999]; //placeholder
    int semester;
	

    public Student(String studentFirstName, String studentLastName, String title, String gender, String officialAdress, 
                    String currentAdress, String email, String phoneNumber, 
                    String matriculationNumber, Date dateOfBirth, String studies, int semester, String degree) {
        this.studentFirstName = studentFirstName;
        this.studentLastName= studentLastName;
        this.title = title;
        this.gender = gender;
        this.officialAdress = officialAdress;
        this.currentAdress = currentAdress;
        this.email = email;
        this.phoneNumber = phoneNumber;
        this.matriculationNumber = matriculationNumber;
        this.dateOfBirth = dateOfBirth;
        this.studies = studies;
        this.semester = semester;
        this.degree = degree;
    }
    
    public void saveStudent(String studentFirstName, String studentLastName, String title, String gender, String officialAdress, 
                    String currentAdress, String email, String phoneNumber, 
                    String matriculationNumber, Date dateOfBirth, String studies, int semester, String degree) throws SAXException, IOException, ParserConfigurationException, TransformerException{
        String name = studentFirstName + " " + studentLastName;
        WriteXMLFileStudent.main(name,title, gender, officialAdress, currentAdress, email, phoneNumber, matriculationNumber, studies, semester, degree);
        
    }
    
    public void setStudentFirstName(String studentFirstName){
        this.studentFirstName = studentFirstName;
    }
    
    public String getStudentFirstName(){
        return studentFirstName;
    }
    
    public void setStudentLastName(String studentLastName){
        this.studentLastName = studentLastName;
    }
    
    public String getStudentLastName(){
        return studentLastName;
    }
     public void setTitle(String title){
        this.title = title;
    }
    
    public String getGender(){
        return gender;        
    }   
    
    public void setOfficialAdress(String officialAdress){
        this.officialAdress = officialAdress;        
    }
    
    public String getofficialAdress(){
        return officialAdress;
    }
    
    public void setCurrentAdress(String currentAdress){
        this.currentAdress = currentAdress;        
    }
    
    public String getCurrentAdress(){
        return currentAdress;
    }   
    
    public void setEmail(String email){
        this.email = email;
    }
    
    public String getEmail(){
        return email;
    }   
    
    public void setPhoneNumber(String phoneNumber){
        this.phoneNumber = phoneNumber;
    }
    
    public String getPhoneNumber(){
        return phoneNumber;
    }   
    
    public void setMatriculationNumber(String matriculationNumber){
        this.matriculationNumber = matriculationNumber;
    }
    
    public String getMatriculationNumber(){
        return matriculationNumber;
    }  
    
    public void setDateOfBirth(Date dateOfBirth){
        this.dateOfBirth = dateOfBirth;
    }
    
    public Date getDateOfBirth(){
        return dateOfBirth;
    }  
}
